export function invokeNative (eventName, ...args) {
  return new Promise((resolve, reject) => {
    if (window.NativeAPI && window.NativeAPI[eventName]) {
      window.NativeAPI[eventName].apply(window.NativeAPI, args)
      resolve()
    } else {
      reject(new Error('原生方法 ' + eventName + ' 不存在'))
    }
  })
}